package com.fcai.microserv.autoconfigure.jwt;

import com.fcai.microserv.jwt.JwtConst;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Map;

import static com.fcai.microserv.autoconfigure.jwt.JwtProperties.PREFIX;

@ConfigurationProperties(PREFIX)
@Data
public class JwtProperties {
    public static final String PREFIX = "fcai.microserv.jwt";

    /** jwt令牌有效时间(单位：秒) */
    private long activeTime = 3600;

    /** jwt加解密的盐 */
    private String secretSalt = "72ViMdx8kQopwGhD";

    /** Jwt 令牌在存放的http头 */
    private String httpHeader = JwtConst.DEFAULT_HTTP_HEADER;

    /** 用户类型与资源的映射 */
    private Map<String, String[]> userTypeMapper;
}
